var app = getApp(),
  core = app.requirejs('core');
const api = require("../../../utils/api.js")
Page({
  data: {},
  onLoad: function (options) {
    // 页面初始化 options为页面跳转所带来的参数
    // core.analyticsPage()
    this.setData({
      options: options,
      show: true
    });
    app.url(options);
    this.get_list();
  },
  // 获取订单详情
  get_list: function () {
    var $this = this;
    $this.setData({
      show: false
    });
    let apicontent = api.orders.selLogistics()
    core.get(apicontent, {
      ...$this.data.options
    }, function (res) {
      if (res.code == 1) {
        if(res.data.result){
          let data = JSON.parse(res.data.result)
          $this.setData({
            expressName:res.data.expressName,
            expressSn:res.data.expressSn,
            ...data,
            show: true,
          })
        }else{
          $this.setData({
            show: true,
            Success:false
          })
        }
      }
    })
  },
});